home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_09
/
welstea2
/
cwinpdlg.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-09
|
686b
|
25 lines
// File CWINPDLG.CPP Input Dialog Box
#include <stdio.h>
#include <string.h>
#include "cwdlg.h"
#include "cwdialgs.h"
int string_dialog (HWND Parent,LPCSTR dlg_title,
LPCSTR descr,int maxlen,void *the_string) {
char buffer[80],buffer2[80];
strncpy (buffer,(char *)the_string,maxlen);
sprintf (buffer2,"Enter new %s:",descr);
tinput_dialog *p=
new tinput_dialog(Parent, dlg_title,buffer2,
buffer);
if (!(p->exec_dialog ())) {
delete p;
return 0; }
strncpy ((char *)the_string,p->input_text,maxlen);
((char *)the_string)[maxlen-1] = '\0';
delete p;
return 1;
} // end string_dialog